﻿namespace xWF.Examples.Tkmv.Transitions
{
    /// <summary>
    /// Начинай сначала. Только для тестов
    /// </summary>
    public class DebugOnlyResetButton : TkmvButtonTransitions
    {
        public DebugOnlyResetButton()
        {
            Title = "Повторить (only DEBUG)";
            Icon = "icon-repeat";
        }

        public override bool CanExecute(TkmvWorkItem workItem)
        {
#if DEBUG
            return true;
#else
            return false;
#endif
        }

        protected override void OnExecute(TkmvWorkItem workItem)
        {
            workItem.UpdateCardStatus(TkmvStatus.New);
        }
    }
}